package com.ryan.spring.annotation.tx;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * Created by kaimin on 29/1/2019.
 * time : 17:37
 */
@Repository
public class TestDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    public void insert(String name){
        String sql = "insert into T_TEST (name) values(?)";
        jdbcTemplate.update(sql,name);
    }
}
